import json
import app
import os
def common_assert(testcase,resp,status_code,success,code,message):
    testcase.assertEqual(status_code,resp.status_code)
    testcase.assertEqual(success,resp.json().get('success'))
    testcase.assertEqual(code,resp.json().get('code'))
    testcase.assertIn(message,resp.json().get('message'))

def read_json_data(filename):
    with open(filename,'r',encoding='utf8') as f:
        json_data = json.load(f)
        # print('读到的文件数据为:',json_data)
        result_list= []
        for login_data in json_data:
            result_list.append(tuple(login_data.values()))
        return result_list



if __name__ == '__main__':
    ret=read_json_data(app.BASE_PATH +'/data/'+'login_data.json')
    print(ret)